package com.liang.auth.common.enums;

import lombok.Getter;

@Getter
public enum AuthUserStatusEnum {
    NORMAL(0,"正常"),
//    LOCKED(2,"锁定"),
    DISABLED(1,"禁用"),
//    DELETED(4,"删除")
    ;
    private Integer code;
    private String status;

    AuthUserStatusEnum(Integer code, String status) {
        this.status = status;
        this.code = code;
    }

    public static AuthUserStatusEnum getByCode(Integer code) {
        for (AuthUserStatusEnum value : AuthUserStatusEnum.values()) {
            if (value.code.equals(code)) {
                return value;
            }
        }
        return null;
    }
}
